#include <time.h>
#include <windows.h>
#include <conio.h>
#include <iostream>
using namespace std;


int main(){
	clock_t s,t;
	int a=0;
	while(!kbhit()) Sleep(100);
	cout<<"ready"<<endl;
	while(kbhit()){
		Sleep(500);
		getch();
		cout<<kbhit();
	}
	s = clock();
	cout<<"start"<<endl;
	while(!kbhit()) a = a;
	t = clock();
	cout<<"finish"<<endl;
	cout<<"this time you use "<<t-s<<"ms to finish";
	system("pause");
	return 0;
}
